

from selenium import webdriver
from time import sleep

class Base():

    # 初始化驱动
    def __init__(self,driver):
        self.driver = driver
        # self.driver = webdriver.Edge()
    # 获取网址的方法
    def get_url(self,url):
        self.driver.get(url)

    # 定位元素的方法
    def find_elemnet(self,loc):
        return self.driver.find_element(*loc)

    # 点击事件
    def click(self,loc):
        self.find_elemnet(loc).click()

    # 输入信息的方法
    def send_keys(self,loc,info):
        self.find_elemnet(loc).send_keys(info)